how to draw objects using a grid